package com.example.service.userorder.impl;

import com.example.dao.userorder.UserOrderDao;
import com.example.pojo.Orderreturn;
import com.example.pojo.Product;
import com.example.pojo.Userorder;
import com.example.pojo.intermediate.OrderreturnSc;
import com.example.service.userorder.UserOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserOrderServiceImpl implements UserOrderService {
    @Autowired
    private UserOrderDao userOrderDao;
    @Override
    public List<Userorder> userorderall(Userorder userorder) {
        if(userorder.getCreateDate() != null){
            System.out.println(userorder.getCreateDate());
        }

        return userOrderDao.userorderall(userorder);
    }


    @Override
    public Product getBysp(Integer id) {
        return userOrderDao.getBysp(id);
    }

    @Override
    public List<OrderreturnSc> getOrderrenturnScAll(OrderreturnSc orderreturnSc) {
        return userOrderDao.getOrderrenturnScAll(orderreturnSc);
    }
}
